package xyz.xtt.asset.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import xyz.xtt.asset.client.request.AssetNoInfoRequest;
import xyz.xtt.asset.client.response.TblAssetNoDto;
import xyz.xtt.asset.service.ITblAssetNoService;
import xyz.xtt.common.response.ApiResult;

/**
 * @author daveafei
 * @date 2024/12/28
 */
@Tag(name = "资产卡号", description = "资产卡号")
@RefreshScope
@Slf4j
@RestController
@RequestMapping("/api/asset/assetNo")
public class AssetNoController {

	@Autowired
	private ITblAssetNoService assetNoService;

	@Operation(summary = "获取用户当前资产的编号信息")
	@PostMapping("/getNFTNoInfo")
	public ApiResult<List<TblAssetNoDto>> getNFTNoInfo(@RequestBody AssetNoInfoRequest assetNoInfoRequest) {
		List<TblAssetNoDto> list = assetNoService.getNFTNoInfo(assetNoInfoRequest);
		return ApiResult.ok(list);
	}
}